package org.raymond.iworks.apis;

import org.raymond.iworks.apis.common.Result;
import org.raymond.iworks.apis.fallbackFactory.ITUserRoleServiceFallbackFactory;
import org.raymond.iworks.apis.vo.role.UserRoleVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

//@Resource(name="user-role")
@FeignClient(name="admin", contextId="user-role",
        fallbackFactory = ITUserRoleServiceFallbackFactory.class
)
public interface ITUserRoleServiceApi {
    //@Resource(name="user-role:edit")
    @PostMapping("/user-role/create")
    Result<Boolean> create(@RequestBody UserRoleVO vo);

    //@Resource(name="user-role:edit")
    @PostMapping("/user-role/delete")
    Result<Boolean> delete(@RequestBody UserRoleVO vo);

    //@Resource(name="user-role:query")
    @GetMapping("/user-role/list")
    Result<UserRoleVO> list(@SpringQueryMap UserRoleVO vo);
}
